#include <Windows.h>
#include <iostream>

#include "EngineUtilities\GameTimerHighResolution.h"
using namespace EngineGame::EngineUtilities;

int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
{
	IGameTimer* timer = new GameTimerHighResolution();
	timer->initTimer();

	timer->startTimer();
	double x = 0;
	for (int i = 0; i < 1000000; i++)
		x = x + i;
	double elapsed1 = timer->getElapsedTime();
	timer->startTimer();
	for (int i = 0; i < 1000000; i++)
		x = x + i;
	double elapsed2 = timer->getElapsedTime();

	std::cout << "Elapsed 1 = " << elapsed1 << std::endl;
	std::cout << "Elapsed 2 = " << elapsed2 << std::endl;
	return 0;
}